package ua.com.abakumov.android.prostopleer.engines

import android.os.AsyncTask
import ua.com.abakumov.android.prostopleer.util.Composition

/**
 *
 * User: aabakumov, Date: 18.12.12, Time: 19:25 
 */
abstract class Downloader extends AsyncTask[Composition, String, String] {
  protected def doDownload(composition: Composition): String

  override protected def doInBackground(compositions: Composition*): String = {
    val composition = compositions(0)
    doDownload(composition)
  }

  protected override def onPostExecute(result: String) {
    //completed(result)
    //resultDone.done(result)
  }
}
